package csu.jpetstore.jpetstore.domain;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
@Entity
@Table(name = "shopping_cart")
@JsonIgnoreProperties({"handler", "hibernateLazyInitializer"})
public class ShopCart implements Serializable {
    @JoinColumn(name = "user_id")
    @ManyToOne
    Users user;
    @JoinColumn(name = "item_id")
    @ManyToOne
    Item item;
    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    private Date addTime;
    private BigDecimal addPrice;
    private Integer quantity;
    private String status;
}
